<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="com.blockchain.console.servlets.financial.gd.GdSsz"%>
<%@page import="com.blockchain.console.servlets.financial.gd.GdJycg"%>
<%@page import="com.blockchain.console.servlets.financial.gd.GdYpx"%>
<%@page import="com.blockchain.console.servlets.financial.gd.GdGdz"%>
<%@page import="com.blockchain.console.servlets.financial.gd.GdShsb"%>
<%@page import="com.blockchain.console.servlets.financial.gd.GdCheck"%>
<%@page import="com.blockchain.console.service.financial.entity.GdglRecord"%>
<%@page import="com.blockchain.console.servlets.financial.gd.GdglList"%>
<%@page import="com.blockchain.console.servlets.financial.AbstractFinancialServlet"%>
<%@page import="java.math.BigDecimal"%>
<html>
<head>
<%@include file="/WEB-INF/include/meta.jsp"%>
<%@include file="/WEB-INF/include/style.jsp"%>
<%@include file="/WEB-INF/include/datepicker.jsp"%>
<style type="text/css">
	.yhgl_inputtext{ background:#fff; border:1px #d7dfe3 solid; height:23px; line-height:23px; width:175px;}
</style>
</head>
<%
		PagingResult<GdglRecord> result = (PagingResult<GdglRecord>) request.getAttribute("result");
		BigDecimal totalAmount=new BigDecimal(0);
		BigDecimal totalFee=new BigDecimal(0);
%>
<%
			CURRENT_CATEGORY = "CWGL";
			CURRENT_SUB_CATEGORY = "GDGL";
	%>
<body>
	<%@include file="/WEB-INF/include/header.jsp"%>
	<div class="w_main">
		<div class="main clearfix">
			<div class="wrap">
				<div class="r_main">
					<form action="<%=controller.getURI(request, GdglList.class)%>" method="post" id="searchForm" name="form1">
					<div class="home_main">
						<div class="box box1 mb15">
							<div class="atil">
								<h3>用户挂单</h3>
							</div>
						</div>
						<div class="box box1 mb15">
							<div class="con">
								<div class="admin_input admin_pb">
             						<div class="table top3">
             							<p>	
										<span>流水号:</span>
										<input type="text" class="yhgl_inputtext" name="lsh" value="<%StringHelper.filterQuoter(out, request.getParameter("lsh"));%>" />
										</p>
										<P>
										<span>用户名:</span>
										<input type="text" class="yhgl_inputtext" name="yhm" value="<%StringHelper.filterQuoter(out, request.getParameter("yhm"));%>" />
										</P>
										<P>
										<span>姓名:</span>
										<input type="text" class="yhgl_inputtext" name="xm" value="<%StringHelper.filterQuoter(out, request.getParameter("xm"));%>" />
										</P>
										<P>
										</P>
										<P>
										<span>挂单时间：</span>
										<input type="text" name="startExtractonTime" id="datepicker1" readonly="readonly" class="yhgl_input date" />至
										<input type="text" name="endExtractionTime" id="datepicker2" readonly="readonly" class="yhgl_input date" />
										</P>
										<div class="mt10">   
										<input name="search" type="submit" class="btn2 mr10" value="搜索" />
										</div>
								
								<div class="clear"></div>
							</div>
							</div>
							</div>
						</div>
						<div class="newsbox">
							<div class="til clearfix">
								<div class="Menubox">
									<ul>
										<li id="one1" class="hover"><a href="<%=controller.getURI(request, GdglList.class)%>">未审核</a></li>
										<li id="one2"><a href="<%=controller.getURI(request, GdShsb.class)%>">审核失败</a></li>
										<li id="one3"><a href="<%=controller.getURI(request, GdGdz.class)%>">挂单中</a></li>
										<li id="one4"><a href="<%=controller.getURI(request, GdYpx.class)%>">已拍下</a></li>
										<li id="one5"><a href="<%=controller.getURI(request, GdSsz.class)%>">申诉中</a></li>
										<li id="one6" style="border-right: 1px #d7dfe3 solid;"><a href="<%=controller.getURI(request, GdJycg.class)%>">交易成功</a></li>
									</ul>
								</div>
								<div class="clear"></div>
								<div class="border p15 Men_bt no_table" id="con_one_1">
									<table width="100%" border="0" cellspacing="0" cellpadding="0" class="yhgl_table tc">
										<tr class="hsbg">
											<td><input type="checkbox" class="checkAll" /></td>
											<td>流水号</td>
											<td align="center">用户名</td>
											<td align="center">姓名</td>
											<td align="center">挂单数量</td>
											<td align="center">挂单单价</td>
											<td align="center">最小成交数量</td>
											<td align="center">收款方式</td>
											<td align="center">收款账号</td>
											<td align="center">联系电话</td>
											<td align="center">挂单时间</td>
											<td align="center">操作</td>
										</tr>
										<%
										GdglRecord[] gdglRecords = result.getItems();
												if (gdglRecords != null&&gdglRecords.length>0) {
													for (GdglRecord gdglItem : gdglRecords) {
														if (gdglItem == null) {
															continue;
														}
														/* totalAmount=totalAmount.add(gdglItem.extractionAmount);
														totalFee=totalFee.add(gdglItem.charge); */
										%>
										<tr class="dhsbg">
											<td><input type="checkbox" class="checkId" name="id" value="<%=gdglItem.id%>" /></td>
											<td><%=gdglItem.id%></td>
											<td>
											 
												<%StringHelper.filterHTML(out, gdglItem.loginName);%>
											</td>
											<td>
												<%
													StringHelper.filterHTML(out, gdglItem.userName);
												%>
											</td>
											<td>
												<%=Formater.formatAmount(gdglItem.gdsl)%>
											</td>
											<td>
												<%=Formater.formatAmount(gdglItem.gddj)%>
											</td>
											<td>
												<%=Formater.formatAmount(gdglItem.zxcjsl)%>
											</td>
											<td>
												<%
													StringHelper.filterHTML(out, gdglItem.zfType.getName());
												%>
											</td>
											<td>
												<%
													StringHelper.filterHTML(out, gdglItem.skzh);
												%>
											</td>
											<td>
												<%
													StringHelper.filterHTML(out, gdglItem.lxdh);
												%>
											</td>
											<td><%=DateTimeParser.format(gdglItem.gdsj,"yyyy-MM-dd HH:mm")%></td>
											<td align="center" class="blue">
											<%
											if (blockchainSession.isAccessableResource(GdCheck.class)) {
											%>
											<a href="<%=controller.getURI(request, GdCheck.class)%>?id=<%=gdglItem.id%>">审核</a>
											<%}else{ %>
											<span class="gray6">审核</span>
											<%} %> 
											</td>
										</tr>
										<%
													}
												} else {
										%>
										<tr>
											<td colspan="16" align="center">没有记录</td>
										</tr>
										<%
											}
										%>
										<%-- <tr>
										<td colspan="16" align="left">
											<span style="padding-top: 5px">总计：提现金额 <span style="color: red;"><%=Formater.formatAmount(totalAmount) %></span>,
											手续费<span style="color: red;"><%=Formater.formatAmount(totalFee) %></span>,
											共<span style="color: red;"><%=txglRecords!=null?txglRecords.length:0 %></span>笔</span>
										</td>
										</tr> --%>
									</table>
											<%-- <%
											if (blockchainSession.isAccessableResource(BatchCheckTxgl.class)) {
											%>
											<input type="button" class="btn3 mr10" value="批量审核通过" onclick="checkAll('<%=WithdrawStatus.SHTG.name()%>','<%=controller.getURI(request, BatchCheckTxgl.class)%>')" /> 
											<%}else{ %>
											<span class="btn3 mr10 btn5 tc">批量审核通过</span>
											<%} %> 
											<%
											if (blockchainSession.isAccessableResource(BatchCheckTxgl.class)) {
											%>
											<input type="button" class="btn3 mr10" onclick="checkAll('<%=WithdrawStatus.SHSB.name()%>','<%=controller.getURI(request, BatchCheckTxgl.class)%>')" value="批量审核不通过" />
											<%}else{ %>
											<span class="btn3 mr10 btn5 tc">批量审核不通过</span>
											<%} %> --%>
											
									<%
										AbstractFinancialServlet.rendPagingResult(out, result);
									%>
								</div>
							</div>
							<div class="clear"></div>
						</div>
						<div class="box2 clearfix"></div>
					</div>
					</form>
				</div>
			</div>
			<%@include file="/WEB-INF/include/left.jsp"%>
		</div>
	</div>
	<%-- <div id="reasonDiv" style="display: none;">
		<div class="popup_bg"></div>
		<div class="popup add_information"
			style="width: 450px; margin: -70px 0 0 -225px; height: 200px; z-index: 99999; position: fixed; left: 50%; top: 50%; _position: absolute; _top: expression(200 +((   e =   document.documentElement.scrollTop)?e:document.body.scrollTop)+'px'); z-index: 100000;">
			<div class="til clearfix">
				<h2>批量审核不通过</h2>
				<div class="close">
					<a href="javascript:void(0)" class="close">关闭</a>
				</div>
			</div>
			<div class="con">
				<form action="<%=controller.getURI(request, BatchCheckTxgl.class)%>" method="post">
					<input type="hidden" name="status" value="<%=WithdrawStatus.SHSB.name()%>" /> <input type="hidden" name="ids" id="ids" />
					<table>
						<tr>
							<td valign="top"><span>请填写不通过的原因:</span></td>
							<td><textarea rows="4" cols="40" name="check_reason"></textarea></td>
						</tr>
						<tr align="center">
							<td colspan="2"><button type="submit" class="btn3">确认</button>
								<button type="button" class="btn5 close">取消</button></td>
						</tr>
					</table>
				</form>
			</div>
		</div>
	</div> --%>
	<%
		String warringMessage=controller.getPrompt(request, response, PromptLevel.WARRING);
		if(!StringHelper.isEmpty(warringMessage))
		{
	%>
	<div class="w440 thickbox thickpos" style="margin:-80px 0 0 -220px;" id="showDiv">
      <div class="info clearfix">
        <div class="clearfix">
            <span class="fl tips"><%StringHelper.filterHTML(out, warringMessage); %></span>
        </div>
        <div class="dialog_btn">
        <input type="button" name="button2" onclick="$('#showDiv').hide()" value="确认"  class="btn4 ml50"/></div> 
      </div>
	</div>
	<%} %>
	<%@include file="/WEB-INF/include/footer.jsp"%>
	<%@include file="/WEB-INF/include/script.jsp"%>
	<script type="text/javascript" src="<%=controller.getStaticPath(request)%>/js/txgl/withdrawals.js"></script>
	<%@include file="/WEB-INF/include/datepicker.jsp"%>
	<script type="text/javascript">
	$(function() {
		$("#datepicker1").datepicker({inline: true});
	    $('#datepicker1').datepicker('option', {dateFormat:'yy-mm-dd'});
	    $("#datepicker2").datepicker({inline: true});
	    $('#datepicker2').datepicker('option', {dateFormat:'yy-mm-dd'});
	    $("#datepicker1").datepicker("setDate", "<%StringHelper.filterHTML(out, request.getParameter("startExtractonTime"));%>");
	    $("#datepicker2").datepicker("setDate", "<%StringHelper.filterHTML(out, request.getParameter("endExtractionTime"));%>");
	});
	</script>
</body>
</html>